import request from '@/utils/request';

// 获取推荐内容分页列表
export const getRecommendPage = (params) => {
  return request({
    url: '/article/content/recommand/page',
    method: 'get',
    params
  });
};

// 创建推荐内容
export const createRecommend = (data) => {
  return request({
    url: '/article/content/recommand',
    method: 'post',
    data
  });
};

// 更新推荐内容
export const updateRecommend = (id, data) => {
  return request({
    url: `/article/content/recommand/${id}`,
    method: 'put',
    data
  });
};

// 删除推荐内容
export const deleteRecommend = (id) => {
  return request({
    url: `/article/content/recommand/${id}`,
    method: 'delete'
  });
};

// 根据ID获取推荐内容详情
export const getRecommendById = (id) => {
  return request({
    url: `/article/content/recommand/${id}`,
    method: 'get'
  });
};